﻿<%@ Page Language="C#" MasterPageFile="~/masterpages/PublicThreeColumnLayout.master" AutoEventWireup="true" CodeFile="Register.aspx.cs" Inherits="public_Register" Title="Untitled Page" %>
<%@ Register TagPrefix="ucc" Namespace="WebControlCaptcha" Assembly="WebControlCaptcha" %>
<%@ Register TagPrefix="ucc" Assembly="web-controls" Namespace="CodeWork.WebControls" %>
<%@ Register TagPrefix="ucc" TagName="Password" Src="~/controls/Password.ascx" %>
<%@ Register TagPrefix="ucc" TagName="DatePicker" Src="~/controls/DatePicker.ascx" %>

<asp:Content ID="head" ContentPlaceHolderID="head" Runat="Server">
</asp:Content>
<asp:Content ID="MiddleContent" ContentPlaceHolderID="MiddleContent" Runat="Server">
    <script src="../javascripts/ApplicationCommon.js" type="text/javascript"></script>
    <table class="registrationInputArea">
        <tr>
            <td>        
                <div class="row">
                    <div class="col">
                        <div class="row">
                            <asp:ValidationSummary ID="vsmRegistration" runat="server" CssClass="validationSummary" 
                                HeaderText="Please correct the following issues." ValidationGroup="RegisterValidate" />
                        </div>
                        <div class="row">
                            <div class="col registerTitle">User ID<br /><span class="smallNote">(Email address is also accepted)</span></div>
                            <div class="col">
                                <asp:TextBox ID="tbxUserId" runat="server" CssClass="registrationTextBox" MaxLength="20" ></asp:TextBox>
                            </div>
                            <div class="col">
                                <asp:RegularExpressionValidator ID="rexUserId" runat="server" ControlToValidate="tbxUserId"
                                    Display="Dynamic" ErrorMessage="<%$ Code:CodeWork.Library.RegExUtil.UserNameFormatError %>" 
                                    ValidationExpression="<%$ Code:CodeWork.Library.RegExUtil.UserNameFormat %>" Text="*"
                                    ValidationGroup="RegisterValidate">
                                </asp:RegularExpressionValidator>
                            </div>
                            <div class="col">
                                <asp:RequiredFieldValidator ID="rqvUserId" runat="server" ControlToValidate="tbxUserId"
                                    Display="dynamic" ErrorMessage="UserID is required" Text="*" ValidationGroup="RegisterValidate">
                                </asp:RequiredFieldValidator>
                            </div>
                            <div class="col registerUserIdAvailabilityCheckImage">
                                <asp:Image ID="imgAvailability" runat="server" Visible="false" ImageUrl="#"
                                    AlternateText="User ID Availability" />
                            </div>
                            <div class="col">
                                <asp:Button ID="btnCheckAvailability" runat="server" OnClick="CheckUserId" 
                                    Text="Check Availability" CausesValidation="false" />
                            </div> 
                        </div>
                        <div class="row">
                            <div class="col">
                                <ucc:Password ID="uccPassword" runat="server" TitleCssClass="registerTitle" 
                                    TextBoxCssClass="registrationTextBox" PasswordHintCssClass="smallLink" 
                                    PasswordStrengthCssClass="registerPasswordStrength" ValidationGroup="RegisterValidate" />
                            </div>
                        </div>
                        <div class="row">
                            <div class="col registerTitle">Email Address</div>
                            <div class="col">
                                <asp:TextBox ID="tbxEmail"  CssClass="registrationTextBox" runat="server" MaxLength="30" 
                                    Text="sample@domain.com" onclick="clearText(this,'sample@domain.com','#575757')"
                                    onkeyup="clearText(this,'sample@domain.com','#575757')" onblur="resetText(this,'sample@domain.com','#a1a1a1')">
                                </asp:TextBox>
                            </div> 
                            <div class="col">
                                <asp:RegularExpressionValidator ID="rexEmail" runat="server" Text="*" ValidationGroup="RegisterValidate"
                                    Display="Dynamic" ErrorMessage="<%$ Code:CodeWork.Library.RegExUtil.EmailFormatError %>" 
                                    ValidationExpression="<%$ Code:CodeWork.Library.RegExUtil.EmailFormat %>" ControlToValidate="tbxEmail">
                                </asp:RegularExpressionValidator>
                            </div>
                            <div class="col">
                                <asp:RequiredFieldValidator ID="RequiredFieldValidator1" runat="server" ControlToValidate="tbxEmail"
                                    Display="dynamic" ErrorMessage="Email address is required" Text="*" InitialValue="sample@domain.com"
                                    ValidationGroup="RegisterValidate">
                                </asp:RequiredFieldValidator>
                            </div>
                        </div>
                        <div class="row divider"><div></div></div>
                        <div class="row">
                            <div class="col registerTitle">Your name</div>
                            <div class="col">
                                <asp:TextBox ID="tbxFirstName" CssClass="registrationTextBox" runat="server" MaxLength="30"
                                    Text="First Name" onclick="clearText(this,'First Name','#575757')" 
                                    onkeyup="clearText(this,'First Name','#575757')" onblur="resetText(this,'First Name','#a1a1a1')">
                                </asp:TextBox>
                            </div>
                            <div class="col">
                                <asp:RegularExpressionValidator ID="rexFirstName" runat="server" ControlToValidate="tbxFirstName"
                                    Display="Dynamic" ErrorMessage="<%$ Code:CodeWork.Library.RegExUtil.TextOnlyFormatError %>" 
                                    ValidationExpression="<%$ Code:CodeWork.Library.RegExUtil.TextOnlyFormat %>" Text="*" 
                                    ValidationGroup="RegisterValidate">
                                </asp:RegularExpressionValidator>
                            </div>
                            <div class="col">
                                <asp:RequiredFieldValidator ID="rqvFirstName" runat="server" ControlToValidate="tbxFirstName"
                                    Display="dynamic" ErrorMessage="First name is required"
                                    InitialValue="First Name" Text="*" ValidationGroup="RegisterValidate">
                                </asp:RequiredFieldValidator>
                            </div>
                            <div class="col">
                                <asp:TextBox ID="tbxLastName" CssClass="registrationTextBox" runat="server" MaxLength="30" 
                                    Text="Last Name" onclick="clearText(this,'Last Name','#575757')" 
                                    onkeyup="clearText(this,'Last Name','#575757')" onblur="resetText(this,'Last Name','#a1a1a1')">
                                </asp:TextBox>
                            </div>
                            <div class="col">
                                <asp:RegularExpressionValidator ID="rexLastName" runat="server" ControlToValidate="tbxLastName"
                                    Display="Dynamic" ErrorMessage="<%$ Code:CodeWork.Library.RegExUtil.TextOnlyFormatError %>" 
                                    ValidationExpression="<%$ Code:CodeWork.Library.RegExUtil.TextOnlyFormat %>" Text="*" 
                                    ValidationGroup="RegisterValidate">
                                </asp:RegularExpressionValidator>
                            </div>
                            <div class="col">
                                <asp:RequiredFieldValidator ID="rqvLastName" runat="server" ControlToValidate="tbxLastName"
                                    Display="dynamic" ErrorMessage="Last name is required"
                                    InitialValue="Last Name" Text="*" ValidationGroup="RegisterValidate">
                                </asp:RequiredFieldValidator>
                            </div>
                        </div>
                        <div class="row">
                            <div class="col registerTitle">Date of Birth</div>
                            <div class="col">
                                <ucc:DatePicker ID="uccDateOfBirth" DropDownCssClass="registrationDropDownList" Text="*" 
                                    TextBoxCssClass="registrationTextBox" ReplaceFontColor="#575757" runat="server" 
                                    ValidationGroup="RegisterValidate" />
                            </div>
                        </div>
                        <div class="row">
                            <div class="col registerTitle">Address Line 1</div>
                            <div class="col">
                                <asp:TextBox ID="tbxAddressLine1" CssClass="registrationTextBox" runat="server" MaxLength="500"></asp:TextBox>
                            </div>
                            <div class="col">
                                <asp:RegularExpressionValidator ID="rexAddressLine1" runat="server" ControlToValidate="tbxAddressLine1"
                                    Display="Dynamic" ErrorMessage="<%$ Code:CodeWork.Library.RegExUtil.TextOnlyFormatError %>" 
                                    ValidationExpression="<%$ Code:CodeWork.Library.RegExUtil.TextOnlyFormat %>" Text="*" 
                                    ValidationGroup="RegisterValidate">
                                </asp:RegularExpressionValidator>
                            </div>
                        </div>
                        <div class="row">
                            <div class="col registerTitle">Address Line 2</div>
                            <div class="col">
                                <asp:TextBox ID="tbxAddressLine2" CssClass="registrationTextBox" runat="server" MaxLength="500"></asp:TextBox>
                            </div>
                            <div class="col">
                                <asp:RegularExpressionValidator ID="rexAddressLine2" runat="server" ControlToValidate="tbxAddressLine2"
                                    Display="Dynamic" ErrorMessage="<%$ Code:CodeWork.Library.RegExUtil.TextOnlyFormatError %>" 
                                    ValidationExpression="<%$ Code:CodeWork.Library.RegExUtil.TextOnlyFormat %>" Text="*" 
                                    ValidationGroup="RegisterValidate">
                                </asp:RegularExpressionValidator>
                            </div>
                        </div>
                        <div class="row">
                            <div class="col registerTitle">State</div>
                            <div class="col">
                                <asp:TextBox ID="tbxState" CssClass="registrationTextBox" runat="server" MaxLength="200"></asp:TextBox>
                            </div>
                            <div class="col">
                                <asp:RegularExpressionValidator ID="rexState" runat="server" ControlToValidate="tbxState"
                                    Display="Dynamic" ErrorMessage="<%$ Code:CodeWork.Library.RegExUtil.TextOnlyFormatError %>" 
                                    ValidationExpression="<%$ Code:CodeWork.Library.RegExUtil.TextOnlyFormat %>" Text="*" 
                                    ValidationGroup="RegisterValidate">
                                </asp:RegularExpressionValidator>
                            </div>
                        </div>
                        <div class="row">
                            <div class="col registerTitle">City</div>
                            <div class="col">
                                <asp:TextBox ID="tbxCity" CssClass="registrationTextBox" runat="server" MaxLength="200"></asp:TextBox>
                            </div>
                            <div class="col">
                                <asp:RegularExpressionValidator ID="rexCity" runat="server" ControlToValidate="tbxCity"
                                    Display="Dynamic" ErrorMessage="<%$ Code:CodeWork.Library.RegExUtil.TextOnlyFormatError %>" 
                                    ValidationExpression="<%$ Code:CodeWork.Library.RegExUtil.TextOnlyFormat %>" Text="*" 
                                    ValidationGroup="RegisterValidate">
                                </asp:RegularExpressionValidator>
                            </div>
                        </div>
                        <div class="row">
                            <div class="col registerTitle">Country</div> 
                            <div class="col"><ucc:CountryDropDownList ID="uccCountry" CssClass="registrationDropDownList" runat="server"></ucc:CountryDropDownList></div>
                            <div class="col">
                                <asp:RequiredFieldValidator ID="rqvCountry" runat="server" ControlToValidate="uccCountry"
                                    Display="dynamic" ErrorMessage="Country is required" InitialValue="-1" Text="*" 
                                    ValidationGroup="RegisterValidate">
                                </asp:RequiredFieldValidator>
                            </div>
                        </div>
                        <div class="row">
                            <div class="col registerTitle">Postal Code</div>
                            <div class="col">
                                <asp:TextBox ID="tbxPostalCode" CssClass="registrationTextBox" runat="server" MaxLength="10"></asp:TextBox>
                            </div>
                            <div class="col">
                                <asp:RegularExpressionValidator ID="rexPostalCode" runat="server" ControlToValidate="tbxPostalCode"
                                    Display="Dynamic" ErrorMessage="<%$ Code:CodeWork.Library.RegExUtil.NumberOnlyFormatError %>" 
                                    ValidationExpression="<%$ Code:CodeWork.Library.RegExUtil.NumberOnlyFormat %>" Text="*" 
                                    ValidationGroup="RegisterValidate">
                                </asp:RegularExpressionValidator>
                            </div>
                        </div>
                        <div class="row">
                            <div class="col registerTitle">Phone number</div>
                            <div class="col">
                                <asp:TextBox ID="tbxPhone" CssClass="registrationTextBox" runat="server" MaxLength="20"></asp:TextBox>
                            </div>
                            <div class="col smallNote">(e.g. XXX-XXX-XXXX)&nbsp;</div>
                            <div class="col">
                                <asp:RegularExpressionValidator ID="rexPhoneNumber" runat="server" ControlToValidate="tbxPhone"
                                    Display="Dynamic" ErrorMessage="<%$ Code:CodeWork.Library.RegExUtil.USPhoneNumberFormatError %>" 
                                    ValidationExpression="<%$ Code:CodeWork.Library.RegExUtil.USPhoneNumberFormat %>" Text="*" 
                                    ValidationGroup="RegisterValidate">
                                </asp:RegularExpressionValidator>
                            </div>
                        </div>
                        <div class="row divider"><div></div></div>
                        <div class="row">
                            <div class="col registerTitle">Security Question</div>
                            <div class="col">
                                <asp:TextBox ID="tbxSecurityQuestion" CssClass="registrationTextBox" runat="server" 
                                    MaxLength="30"></asp:TextBox>
                            </div>
                            <div class="col">
                                <asp:RegularExpressionValidator ID="rexSecurityQuestion" runat="server" ControlToValidate="tbxSecurityQuestion"
                                    Display="Dynamic" ErrorMessage="<%$ Code:CodeWork.Library.RegExUtil.TextOnlyFormatError %>" 
                                    ValidationExpression="<%$ Code:CodeWork.Library.RegExUtil.TextOnlyFormat %>" Text="*" 
                                    ValidationGroup="RegisterValidate">
                                </asp:RegularExpressionValidator>
                            </div>
                        </div>
                        <div class="row">
                            <div class="col registerTitle">Answer</div>
                            <div class="col">
                                <asp:TextBox ID="tbxSecurityAnswer" CssClass="registrationTextBox" runat="server" 
                                    MaxLength="30"></asp:TextBox>
                            </div>
                            <div class="col">
                                <asp:RegularExpressionValidator ID="rexAnswer" runat="server" ControlToValidate="tbxSecurityAnswer"
                                    Display="Dynamic" ErrorMessage="<%$ Code:CodeWork.Library.RegExUtil.TextOnlyFormatError %>" 
                                    ValidationExpression="<%$ Code:CodeWork.Library.RegExUtil.TextOnlyFormat %>" Text="*" 
                                    ValidationGroup="RegisterValidate">
                                </asp:RegularExpressionValidator>
                            </div>
                        </div>
                        <div class="row">
                            <div class="col registerTitle">&nbsp;</div>
                            <div class="col registrationCaptcha">
                                <ucc:captchacontrol ID="uccCaptcha" runat="server"></ucc:captchacontrol>
                            </div>
                            <div class="col">
                                <asp:CustomValidator ID="cuvCaptcha" runat="server" ValidationGroup="RegisterValidate"
                                    OnServerValidate="Captcha_Validate" ErrorMessage="*"  Text="*" ></asp:CustomValidator>
                            </div>
                        </div>
                        <div class="row">
                            <div class="col registerTitle">&nbsp;</div>
                            <div class="col terms">
                                I have read and agree to the <a href="#">Terms of Service and Privacy Policy</a> <br />
                                of this website, and to receive important communications from this <br />
                                website electronically.
                            </div> 
                        </div>
                        <div class="row">
                            <div class="col registerTitle">&nbsp;</div>
                            <div class="col checkbox"><asp:CheckBox ID="cbxAgreeTerms" runat="server" Text=" I agree to the above terms" />&nbsp;</div>
                            <div class="col">
                                <asp:CustomValidator ID="cuvAgreeTerms" runat="server" OnServerValidate="validateTerms"
                                    Display="Dynamic" ClientValidationFunction="checkTermAccepted" Text="*"
                                    ErrorMessage="<%$ Code:CodeWork.Library.CommonMessage.RegistrationTermAgreeMessage %>"
                                    ValidationGroup="RegisterValidate">
                                </asp:CustomValidator>
                            </div>
                        </div>
                        <div class="row">
                            <div class="col registerTitle">&nbsp;</div>
                            <div class="col">
                                <asp:ImageButton ID="ibtCreateAccount" runat="server" AlternateText="Create My Account"
                                    OnClick="CreateAccount_Click" ValidationGroup="RegisterValidate"/>
                            </div>
                            <div class="col">
                                <asp:ImageButton ID="ibtCancel" runat="server" AlternateText="Cancel" OnClick="Cancel_Click" />
                            </div>
                        </div>
                    </div>
                </div>
            </td>
        </tr>
    </table>
</asp:Content>

